-
Notifications
You must be signed in to change notification settings - Fork 378
⚡️(frontend) improve accessibility of selected document's sub-menu #1261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
3463226
to
a4249b3
Compare
6d0eba4
to
069359a
Compare
0d49097
to
fa6b764
Compare
Indeed, I have removed the outline to match the kit behavior and style and add the missing auto focus for some element. |
adds focus style to make the sub-menu accessible unify dropdownmenu Signed-off-by: Cyril <[email protected]>
enter/space now trigger only on real focus add useTreeItemKeyboardActivate hook Signed-off-by: Cyril <[email protected]>
adds proper aria props and translation keys for accessibility support Signed-off-by: Cyril <[email protected]>
927fffa
to
c515b80
Compare
c515b80
to
d6ca4cd
Compare
d6ca4cd
to
6b4c0e9
Compare
6b4c0e9
to
6eb9036
Compare
subdocnavarrow.mp4Fixed ! |
f9da479
to
161ec74
Compare
Purpose
This pull request improves the accessibility of the document tree by allowing keyboard users to:
issue : 1160
createsubdoc.mp4
Sub-document navigation is accessible, we can now navigate and open sub-docs using the keyboard.
Implementation note:
A small useTreeItemKeyboardActivate hook listens for Enter or Space only when the current node has focus (node.isFocused). This compensates for a limitation in react-arborist, which doesn't trigger any "activate" behavior on keyboard events.
For the action buttons (like ... or +) that appear when a tree item is focused:
By default, react-arborist uses a "roving tabindex", so these buttons are not reachable with Tab.
To fix this and make them keyboard-accessible:
I added a hook useActionableMode and some algo.
Proposal